package com.zheng.rpc;

import com.zheng.rpc.Impl.HelloServiceImpl;
import com.zheng.rpc.api.HelloService;
import com.zheng.rpc.entities.RpcServiceProperties;
import com.zheng.rpc.remoting.transport.socket.SocketRpcServer;

public class SocketServer {
    public static void main(String[] args) {
        HelloService helloService = new HelloServiceImpl();
        SocketRpcServer socketRpcServer = new SocketRpcServer();
        RpcServiceProperties rpcServiceProperties = RpcServiceProperties.builder()
                .group("test").version("v1.0").build();
        socketRpcServer.registerService(helloService, rpcServiceProperties);
        socketRpcServer.start();
    }
}
